﻿@inherits System.Web.Mvc.WebViewPage
@{
    LayoutPage = "~/Views/Shared/_Layout.cshtml";
}

<h2>Mvc Graffiti</h2>

<ul id="thumbs" class="thumbnail">
</ul>

<div id="commands">
    <span id="debug"></span>
</div>

@section session{

@if((int)View.SessionId != 0){
	@View.UserName
    <text>&nbsp;|&nbsp;<input type="button" class="addnew" value="新規" /></text>
} else {
	<text>
	@Html.ValidationSummary()
	@using(Html.BeginForm("Index","Graffitis")) {
		<text>
		名前 @Html.TextBox("name")
		<input type="submit" value="参加" />
		</text>
	}
	</text>
}
<div>@View.CurrentIp()</div>

}

@section footer{

<script type="text/javascript" src="@Url.Content("~/scripts/jquery.tmpl.js")"></script>
<script type="text/html" id="tview">
<li style="display:none;" id="graffiti_${id}">
	<a href="/Graffitis/${id}"><img class="thumbnail" src="/Graffitis/Thumbnail/${id}" /></a>
</li>
</script>

<script type="text/html" id="tfull">
<li style="display:none;" id="graffiti_${id}">
	<a href="/Graffitis/${id}"><img class="thumbnail" src="/Graffitis/Thumbnail/${id}" /></a>
	<a href="#" class="thumbnail_delete" rel="${id}"><img src="@Url.Content("~/content/delete.png")" /></a>
</li>
</script>
<script type="text/javascript" src="@Url.Content("~/scripts/core.js")"></script>
<script type="text/javascript" src="@Url.Content("~/scripts/graffitis.js")"></script>

<script type="text/javascript">
    $(function () {
        var list = new Graffitis( '@ViewContext.HttpContext.Request.ApplicationPath', @View.SessionId );
    });
</script>
}